// 该文件代码已作废
import { useFetchVidRefs, useFetchVid } from "./useFetchVid";
export default function useVideo() {
  const { fetchVideos } = useFetchVid();
  const { tabVideoList, loadVidState, cachedVideoList } = useFetchVidRefs();
  const loadVideo = () => {
    fetchVideos();
  };

  onMounted(() => {
    if (!cachedVideoList.value.length) {
      loadVideo();
    }
  });

  return {
    videoList: computed(() => tabVideoList.value),
    loadVidState: computed(() => loadVidState.value),
    loadVideo
  };
}
